/**
 * api接口的统一出口 && 公共接口
 */
import {
	post,
	upLoad
} from './axios.js';
import store from '../store.js';


import home_api from './home.js';
import login_api from './login.js';
import address_api from './address.js';
import article_api from './article.js';
import contribute_api from './contribute.js';
import share_score_api from './share-score.js';
import mymessage_api from './mymessage.js';
import problem_api from './problem.js';
import experience_api from './experience.js';
import myProblem_api from './myProblem.js';
import learn_api from './learn.js';
import collection_api from './collection.js';

// const Token = store.state.token || window.localStorage.getItem("token");
// "Token": store.getters.getToken,

//formData => url
function upLoadPic(formData, callback) {
	upLoad('/home/uploadimage', formData, callback)
}

function uploadVideo(formData, callback) {
	upLoad('/home/uploadvideo', formData, callback)
}


//默认导出
export default {
	home_api,
	login_api,
	address_api,
	article_api,
	contribute_api,
	share_score_api,
	mymessage_api,
	problem_api,
	experience_api,
	myProblem_api,
	learn_api,
	collection_api,
	upLoadPic,
	uploadVideo
}

//单独导出
export {
	home_api
}

export {
	login_api
}

export {
	address_api
}

export {
	article_api
}

export {
	contribute_api
}

export {
	share_score_api
}

export {
	mymessage_api
}

export {
	problem_api
}

export {
	experience_api
}

export {
	myProblem_api
}

export {
	learn_api
}

export {
	collection_api
}

export {
	upLoadPic
}

export {
	uploadVideo
}
